import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker' // 引入配置
import router from './router' // 引入 Vue-router 配置
import store from './store' // 引入 Vuex 配置
import jComponent from './components/index.js'
import './assets/theme/theme-menu.scss' // 引入主题
import installElementPlus from './plugins/element.js' // 引入Element-Plus插件

const app = createApp(App)

// 统一导入el-icon图标
import * as ElIconModules from '@element-plus/icons-vue'
// 导入转换图标名称的函数
import { transElIconName } from './utils/utils.js'
// 统一注册el-icon图标
for(let iconName in ElIconModules){
    app.component(transElIconName(iconName),ElIconModules[iconName])
}

installElementPlus(app)
app.use(router).use(store).use(jComponent).mount('#app')

// createApp(App).use(router).use(store).mount('#app')
